package jdk5.common;

import java.io.Serializable;

public class Teacher implements Serializable {

	/**
	* 
	*/
	private static final long serialVersionUID = 2426007044167814847L;
	private String name;

	private boolean busy;

	public Teacher(String name) {
		this.name = name;
		this.busy = false;
	}

	public void teach() {
		busy = true;
	}

	public void rest() {
		busy = false;
	}

	public boolean isBusy() {
		return busy;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param busy the busy to set
	 */
	public void setBusy(boolean busy) {
		this.busy = busy;
	}
	
	
}
